# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=rinutils
pkgver=0.10.2
pkgrel=1
pkgdesc='C11 / gnu11 utilities C library'
arch=(any)
url='https://www.shlomifish.org/open-source/projects/'
license=(MIT)
depends=()
makedepends=(cmake)
source=(https://github.com/shlomif/rinutils/releases/download/$pkgver/$pkgname-$pkgver.tar.xz)
sha256sums=('d87fe1199722b7fa9bd508e135383ff0788fbd7d655cbef9757c23212f8c217b')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DWITH_TEST_SUITE=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
